package com.lmb.todo.controller;

import com.lmb.todo.pojo.Folder;
import com.lmb.todo.service.FolderService;
import com.lmb.todo.utils.DateUtil;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.ArrayList;
import java.util.List;

@SpringBootTest
public class testFolder {

    @Autowired
    private FolderService folderService;

    @Test
    public void add(){
        String createTime = DateUtil.getCurrentDateStr();
        Folder folder = new Folder(1,"文件夹3","wjj",createTime,null);
        Integer count = folderService.add(folder);
        System.out.println(count);
    }

    @Test
    public void updateGroupByFolderId(){
        Integer count = folderService.updateGroupByFolderId(1,null);
        System.out.println(count);
    }

    @Test
    public void deleteAll(){
        List<Integer> list = new ArrayList<>();
        list.add(13);
        list.add(14);
        Integer count = folderService.deleteAll(list);
        System.out.println(count);
    }
}
